﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Themes/Main.master" AutoEventWireup="true"
    CodeBehind="TeachMaterialsEdit.aspx.cs" Inherits="TrainingsApp.IPADApp.Master.TeachMaterialsEdit" %>

<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v11.1" Namespace="DevExpress.Web.ASPxTreeList"
    TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        body
        {
            margin: 0px;
            padding: 0px;
            font-size: 12px;
            font-family: "微软雅黑";
        }
        
        .editform
        {
            border: 1px solid black;
            padding: 5px;
            margin-top: 5px;
        }
        
        .editform .header
        {
            height: 30px;
            font-size: 16px;
            line-height: 30px;
            font-weight: 700;
            border-bottom: 1px solid #000099;
        }
        .editform .title
        {
            height: 30px;
            padding-top: 3px;
            padding-bottom: 3px;
            width: 15%;
            font-weight: 600;
        }
        
        .editform .input
        {
            height: 30px;
            width: 35%;
            font-weight: 600;
            padding-top: 3px;
            padding-bottom: 3px;
        }
        
        .editform .saves, .backs
        {
            padding-top: 10px;
            padding-bottom: 10px;
            border-top: 3px solid black;
            width: 50%;
            padding-left: 5px;
            padding-right: 5px;
        }
        
        .editform .operat
        {
            background-color: #CCC;
            border-top: 3px solid black;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td align="right" style="padding-right: 20px;">
                <dx:ASPxButton ID="btnSave" Width="100" Text="保存" runat="server" OnClick="btnSave_Click">
                </dx:ASPxButton>
            </td>
            <td align="left" style="padding-left: 20px;">
                <dx:ASPxButton ID="btnBack" Width="100" Text="返回" runat="server" OnClick="btnBack_Click">
                </dx:ASPxButton>
            </td>
        </tr>
    </table>
    <table cellpadding="0" class="editform" width="100%" cellspacing="0" border="0">
        <tr class="header">
            <td class="header" colspan="4">
                教材信息
            </td>
        </tr>
        <tr>
            <td class="title">
                教材名称 :
            </td>
            <td class="input">
                <dx:ASPxTextBox ID="txtName" Width="200" runat="server">
                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" Display="Dynamic">
                        <RequiredField IsRequired="true" ErrorText="请输入教材名称" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
            <td class="title">
                学科名称 :
            </td>
            <td class="input">
                <dx:ASPxComboBox ID="cbxCourseInfo" Width="180px" runat="server">
                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" Display="Dynamic">
                        <RequiredField IsRequired="true" ErrorText="请选择学科" />
                    </ValidationSettings>
                </dx:ASPxComboBox>
            </td>
        </tr>
        <tr>
            <td class="title">
                年级 :
            </td>
            <td class="input">
                <dx:ASPxComboBox ID="cbxGrade" runat="server" Width="180">
                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" Display="Dynamic">
                        <RequiredField IsRequired="true" ErrorText="请选择年级" />
                    </ValidationSettings>
                </dx:ASPxComboBox>
            </td>
            <td class="title">
                编号 :
            </td>
            <td class="input">
                <dx:ASPxTextBox ID="txtCide" Width="200" runat="server">
                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" Display="Dynamic">
                        <RequiredField IsRequired="true" ErrorText="请输入教材编号" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
        </tr>
    </table>
    
    <table border="0" width="100%" style="<%if(!aspTree.Visible){%>display: none; <%}%>margin-top: 10px;"
        cellpadding="0" cellspacing="0">
        <tr>
            <th class="title">
                知识点编辑
            </th>
        </tr>
        <tr>
            <td>
                <dx:ASPxTreeList ID="aspTree" ClientInstanceName="aspxTree" runat="server" KeyFieldName="Idx"
                    ParentFieldName="ParentIdx" AutoGenerateColumns="False" OnNodeDeleted="aspTree_NodeDeleted"
                    OnNodeDeleting="aspTree_NodeDeleting" OnNodeInserted="aspTree_NodeInserted" OnNodeInserting="aspTree_NodeInserting"
                    OnNodeUpdated="aspTree_NodeUpdated" Width="100%" OnNodeUpdating="aspTree_NodeUpdating"
                    OnCancelNodeEditing="aspTree_CancelNodeEditing">
                    <Settings ShowTreeLines="true" ShowColumnHeaders="True" />
                    <SettingsSelection Enabled="False" />
                    <SettingsText CommandEdit="编辑" CommandNew="新增" CommandCancel="取消" CommandDelete="删除"
                        CommandUpdate="保存" ConfirmDelete="是否删除该知识点?" />
                    <SettingsLoadingPanel ImagePosition="Top" />
                    <SettingsBehavior DisablePartialUpdate="false" ExpandCollapseAction="NodeDblClick"
                        ProcessSelectionChangedOnServer="false" ProcessFocusedNodeChangedOnServer="false" />
                    <Border BorderWidth="0" />
                    <Columns>
                        <dx:TreeListTextColumn Caption="知识点" FieldName="Name" VisibleIndex="0">
                            <PropertiesTextEdit EncodeHtml="False">
                            </PropertiesTextEdit>
                        </dx:TreeListTextColumn>
                        <dx:TreeListTextColumn Caption="编号" FieldName="Code" VisibleIndex="0">
                            <PropertiesTextEdit EncodeHtml="False">
                            </PropertiesTextEdit>
                        </dx:TreeListTextColumn>
                        <dx:TreeListCommandColumn VisibleIndex="1">
                            <EditButton Visible="True">
                            </EditButton>
                            <NewButton Visible="True">
                            </NewButton>
                            <DeleteButton Visible="True">
                            </DeleteButton>
                        </dx:TreeListCommandColumn>
                    </Columns>
                    <SettingsBehavior ExpandCollapseAction="NodeDblClick"></SettingsBehavior>
                    <Templates>
                        <DataCell>
                            <table cellpadding="0" cellspacing="0">
                                <tr>
                                    <td style="padding-bottom: 1px;">
                                        <%# Container.Text %>
                                    </td>
                                </tr>
                            </table>
                        </DataCell>
                    </Templates>
                </dx:ASPxTreeList>
            </td>
        </tr>
    </table>
</asp:Content>
